import java.util.Scanner;

interface ICalculate{
    int calculate(int m,int n);
}

class Calculate{
    public void doCalculate(ICalculate cal,int a,int b){
        cal.calculate(a,b);
    }
}

class Add implements ICalculate{

    private int result;
    public int calculate(int m,int n){
        result=m+n;
        System.out.println(m+"+"+n+"="+result);
        return result;
    }
}

class Sub implements ICalculate{
    private int result;
    public int calculate(int m,int n){
        result=m-n;
        System.out.println(m+"-"+n+"="+result);
        return result;
    }
}
class Mul implements ICalculate{
    private int result;
    public int calculate(int m,int n){
        result=m*n;
        System.out.println(m+"*"+n+"="+result);
        return result;
    }
}

class Div implements ICalculate{
    private int result;
    public int calculate(int m,int n){
	if(0==n){
		System.out.println("Error: / by Zero");
		return 0;
	}
        result=m/n;
        System.out.println(m+"/"+n+"="+result);
        return result;
    }
}
class mod implements ICalculate{
    private int result;
    public int calculate(int m,int n){
        result=m%n;
        System.out.println(m+"%"+n+"="+result);
        return result;
    }
}
class mmm implements ICalculate{
    private int result;
    public int calculate(int m,int n){
        result=m^n;
        System.out.println(m+"^"+n+"="+result);
        return result;
    }
}
public class Calculator {
    public static void main(String[] args) {
        int op1;
        int op2;
        Scanner sc = new Scanner(System.in);
        System.out.println("Please input first Number:");
        op1=sc.nextInt();
        System.out.println("Please input second Number:");
        op2=sc.nextInt();
        System.out.print("Add Sub Mul Div Resultes:\n");
        Calculate cal=new Calculate();
        cal.doCalculate(new Add(),1,2);
        cal.doCalculate(new Sub(),1,2);
        cal.doCalculate(new Mul(),1,2);
        cal.doCalculate(new Div(),1,2);
        cal.doCalculate(new Mod(),1,2);
        cal.doCalculate(new Mmm(),1,2);

    }
}
